package com.gzq.learn.springbootdemo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;

//springboot自动配置了支持mongodb。在启动springboot时会自动实例化一个mongo实例，需要禁用自动配置 ，
//增加@SpringBootApplication(exclude = MongoAutoConfiguration.class)这个注解即可，
@SpringBootApplication /*
                        * (exclude = { MongoAutoConfiguration.class,
                        * MongoDataAutoConfiguration.class })
                        */
// 需要mybatis-spring-boot-starter 1.2.0的版本 mybatis自动扫毛mapper文件的配置
@MapperScan("com.gzq.learn.springbootdemo.domain.dao.mybatis")
// 定时任务
@EnableScheduling
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
